using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region OrderDetail

	/// <summary>
	/// OrderDetail object for NHibernate mapped table 'OrderDetails'.
	/// </summary>
	public class OrderDetail
	{
		#region Member Variables
		
		protected int _id;
		protected int _dealInfoId;
		protected int _productId;
		protected string _productTitle;
		protected string _imgUrl;
		protected int _count;
		protected decimal _unitprice;
		protected decimal _total;
        protected int _state;

		#endregion

		#region Constructors

		public OrderDetail() { }

		public OrderDetail( int dealInfoId, int productId, string productTitle, string imgUrl, int count, decimal unitprice, decimal total,int state )
		{
			this._dealInfoId = dealInfoId;
			this._productId = productId;
			this._productTitle = productTitle;
			this._imgUrl = imgUrl;
			this._count = count;
			this._unitprice = unitprice;
			this._total = total;
            this._state = state;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual int DealInfoId
		{
			get { return _dealInfoId; }
			set { _dealInfoId = value; }
		}

		public  virtual int ProductId
		{
			get { return _productId; }
			set { _productId = value; }
		}

		public  virtual string ProductTitle
		{
			get { return _productTitle; }
			set
			{
				if ( value != null && value.Length > 200)
					throw new ArgumentOutOfRangeException("Invalid value for ProductTitle", value, value.ToString());
				_productTitle = value;
			}
		}

		public  virtual string ImgUrl
		{
			get { return _imgUrl; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for ImgUrl", value, value.ToString());
				_imgUrl = value;
			}
		}

		public  virtual int Count
		{
			get { return _count; }
			set { _count = value; }
		}

		public  virtual decimal Unitprice
		{
			get { return _unitprice; }
			set { _unitprice = value; }
		}

		public  virtual decimal Total
		{
			get { return _total; }
			set { _total = value; }
		}

        public virtual int State
        {
            get { return _state; }
            set { _state = value; }
        }

		#endregion
	}
	#endregion
}